Learn R Programming

Momocs (version 0.2-03)

Color palettes: Some color palettes.

Description

col.summer, col.india, col.sari and col.gallus are standard color palettes, obtained with colorRampPalette. col.bw generates a palette from black to white. col.bcol and col.wcol are used to generate a palette from one color to black or white, respectively.

Usage

col.summer(n)
col.sari(n)
col.gallus(n)
col.blackgallus(n)
col.india(n)
col.bw(n)
col.bcol(col.hex)
col.wcol(col.hex)

Arguments

n
integer. The number of colors to create.
col.hex
An hexadecimal character string coding for a color.

Value

  • A vector of hexadecimal color that can be passed to many methods and functions of Momocs and also used as any palette created with colorRampPalette.

Examples

Run this code
pie(rep(1, 12), col=col.summer(12), main="col.summer")
pie(rep(1, 12), col=col.india(12),  main="col.india")
pie(rep(1, 12), col=col.sari(12),   main="col.sari")
pie(rep(1, 12), col=col.gallus(12), main="col.gallus")
pie(rep(1, 12), col=col.blackgallus(12), main="col.blackgallus")
pie(rep(1, 12), col=col.bw(12), main="col.bw")
pie(rep(1, 12), col=col.bcol(col.hex="#FF6600")(12), main="col.bcol and some orange")
pie(rep(1, 12), col=col.wcol(col.hex="#000080")(12), main="col.bcol and some blue")
barplot(1:33, col=col.summer(33))

Run the code above in your browser using DataLab